<%@include file="includes/taglibs.jspf"  %>
<html>	
	<head>
		<title><s:text name="login.welcome"></s:text> </title>
	</head>
	
	<body>
		<script type="text/javascript">
			var lifeyears=${lifeyearsSaved};
			function updateLifeyears() {
				lifeyears=lifeyears+${lifeyearsSavedPerSecond};
				$('#lifeyears').html(lifeyears.toFixed(1));
				setTimeout("updateLifeyears()", 1000);
			}
			setTimeout("updateLifeyears()", 1000);
		</script>
		<p>
			<s:text name="login.lifeyearsSaved">
				<s:param><span id="lifeyears">${lifeyearsSaved}</span></s:param>
			</s:text> 
		</p>

		<h2><s:text name="login.title" /></h2>
			<s:form action="login!execute" method="post">
					<s:textfield name="username" key="user.email" required="true" />
					<s:password name="password" key="user.password" required="true" />
		    		<s:submit key="button.login" name="login" align="center" />
			</s:form>
		
		<s:text name="login.signup">
			<s:param><s:url action="signup"/></s:param>
        </s:text>
		
	</body>
	
</html>